package com.tender.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.tender.utils.CustomDateDeserializerUtil;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.Date;

@Data
@JsonInclude(JsonInclude.Include.NON_NULL) // 只序列化非 null 字段
public class CoscoShipLatestBerthHistoryCondition {

    // 查询条件
    private CoscoShipLatestBerthHistoryEntity condition = new CoscoShipLatestBerthHistoryEntity();

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @JsonDeserialize(using = CustomDateDeserializerUtil.class)
    @Schema(description = "预计到港时间")
    private Date eta;  // 预计到港时间 03 【✔】

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @JsonDeserialize(using = CustomDateDeserializerUtil.class)
    @Schema(description = "确报到港时间")
    private Date dta;  // 确报到港时间 02 【✔】

    @Schema(description = "实际靠泊时间 / 实际到港时间 / 船舶靠泊时间")
    @JsonDeserialize(using = CustomDateDeserializerUtil.class)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date rtb;  // 实际靠泊时间 01 【✔】

}
